package com.qf.mapper2;

import com.qf.domain2.Course;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CourseMapper {

    /**
     * 根据学生id，查询这个学生对应的课程信息
     * @param sid
     * @return
     */
    @Select("SELECT c.*\n" +
            "FROM course c,stu_cr sc \n" +
            "WHERE c.`id`=sc.`cid` AND sc.`sid`=#{sid}")
    public List<Course> findBySid(Integer sid);
}
